<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
body{
  padding:0;
  margin:0;
  font-size:13px;
}
div.yearplaning div.head{
   width:100%;
   background:#cfc;
   margin-bottom:10px;   
}

div.yearplaning div.head select{
   width:200px;
   background-color:#cfc;   
}

div.yearplaning div.head h2{
   text-align:center;
}

div.yearplaning div.data{
   width:80%;
   background:skyblue;
   margin:0 auto;
}
div.yearplaning div.data table.datatable th{
   background:#afeeee;
   color:#2f4f4f;
}

div.yearplaning select{
  background-color:#BFCAE6;
  border:#1B4F93 1px solid;
}

button{
    width:80px;
    background:#3399ff;
    font-size:15px;
    font-weight:bolder;
    text-align:center;
    border:#0066cc 1px solid;
    color:white;
 }
button.addpdt{
    margin-left:30px;
    width:80px;
    background:greenyellow;
    font-size:15px;
    font-weight:bolder;
    text-align:center;
    border:#0066cc 1px solid;
    color:seagreen;
 }
tbody input ,tbody textarea ,tbody select {
   width:100%;
   height:20px;
   font-size:14px;
}
.numbering{
   width:200px;
}
.named{
   font-weight:bolder;
   color:blue;
   font-size:13px;
}
.codeinput{
   background-color:#FEF889;
   border:none;
}
span.tvalue{
  float:right;
  color:red;
  font-weight:bolder;
}
span.amount{
  color:#363636;
  font-weight:bolder;
}
</style>
<script src="scripts/apps/yearplanning/edit.js" defer="defer" type="text/javascript"></script>
</head>
<body>
<div class="yearplaning">
  <div class="head">
     <h2>${bean.name}</h2>
  </div>
  <form>
   <#if bean.id??>
       <input type="hidden" name="bean.id" value="${(bean.id)!}"/>
   </#if>
    <div class="data">
   <table class="datatable">
     <thead>
     <tr>
       <th width="170">编号</th>
       <th width="150">名称</th>      
       <th width="120">数量[价格]</th>
       <th width="70">一</th>
       <th width="70">二</th>
       <th width="70">三</th>
       <th width="70">四</th>
       <th width="80">验收状态</th>
       <th width="150">备注</th>       
       <th width="50">管理</th>       
     </tr>    
     </thead>
     <tbody id="databody">
       <#list bean.dataItems as item>
       <tr>
       <td width="170">
        <input name="bean.dataItems[${item_index}].code" value="${item.code?trim}" class="codeinput"/>
       </td>
       <td width="150">
        <input name="bean.dataItems[${item_index}].name" value="${item.name?trim}" readOnly />
       </td>      
       <td width="120">
         <span class="amount">${item.value}[${item.amount}]</span>
       </td>
       <#assign mvs = item.dataValue?values>
       
       <#list mvs as val>
         <td width="70">
             <input name="bean.dataItems[${item_index}].dataValue[${val_index}]" value="${val}"/>
         </td>
       
       </#list>
                        
       <td width="80">
         <input name="bean.dataItems[${item_index}].validator" value="${(item.validator)!}"/>
       </td>
       <td width="150">
         <input name="bean.dataItems[${item_index}].remark" value="${item.remark}"/>
       </td>       
       <td width="50">
         <img src="${base}/images/remove.gif" onclick="$(this).parent().parent().remove();" />
       </td> 
        <input type="hidden" name="bean.dataItems[${item_index}].price" value="${item.price}" />
       </tr>
      </#list>
     </tbody>
     <tfoot>
       <tr>
        <td colspan="17">
          <button class="savepdt" type="button">保存</button>
          <button class="addpdt" type="button">添加</button>
          <span class="tvalue" >总计:  ${(bean.amount?string("0"))!} 万元</span>
        </td>
       </tr>
     </tfoot>
   </table>
   
   </div>
  </form>
</div>
</body>
</html>